from celery import Celery
import os
import time

celery = Celery('task', broker="amqp://guest@localhost//")
# celery.conf.CELERY_RESULT_BACKEND = os.environ.get("CELERY_RESULT_BACKEND", "ampq")


@celery.task
def add(x, y):
    # 耗时的数据库操作
    # time.sleep(10)
    return x+y











